package com.zhuhjay.service.system.model.dto;

import lombok.Data;
import org.hibernate.validator.constraints.Length;
import org.hibernate.validator.constraints.Range;

import javax.validation.constraints.Min;
import javax.validation.constraints.NotBlank;

/**
 * @author ZhuHJay
 * @date 2023/2/17 8:25
 */
@Data
public class JobDetailDto {

    @Min(value = 1, message = "任务ID不能小于1")
    private Long jobId;
    @NotBlank(message = "任务名称不能为空")
    @Length(max = 64, message = "任务名称长度不能超过64")
    private String jobName;
    @NotBlank(message = "任务组名不能为空")
    @Length(max = 64, message = "任务组名长度不能超过64")
    private String jobGroup;
    private String invokeClass;
    private String cronExpression;
    @Range(min = 0, max = 3, message = "misfire策略错误")
    private Integer misfirePolicy;
    @Length(max = 500, message = "备注长度不能超过500")
    private String remark;

}
